home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / QuickDraw / Custom PicComments⁄Bottlenecks / About CustomPC⁄B next >
Encoding:
Text File  |  1997-03-20  |  1.6 KB  |  52 lines  |  [TEXT/ttxt]

  1.     Custom PicComments/Bottlenecks
  2.     
  3.     This sample groups a bunch of pictures together and
  4.     takes them apart using PicComments and a QuickDraw
  5.     bottleneck procedure.  It's an example of how to
  6.     store and retrieve custom PicComments, among other
  7.     things.
  8.    
  9.     Here's how it works:
  10.     
  11.     All pictures are kept in a global structure for easy
  12.     access.  Note that I use the same bounds rectangle
  13.     for all the pictures, but this isn't necessary.
  14.     You should make sure that the enclosing picture is
  15.     wide enough to hold all the others though, or else
  16.     you'll get clipping when they're displayed.
  17.     
  18.     The global structure contains:
  19.     
  20.         • The no. of pictures currently stored.
  21.         • The PicHandles for each of those pictures.
  22.         • The last rectangle each picture was drawn
  23.           in.  (For erase and redraw procedures.)
  24.           
  25.     First, the app creates some individual pictures of
  26.     various objects.  Then it repeatedly groups and
  27.     ungroups them until the user chooses Quit from the
  28.     File menu.
  29.    
  30.     For demonstration purposes, the app moves the pictures
  31.     around as it alternates between grouped and ungrouped
  32.     stages.  This just shows the user that we really have
  33.     separate or consolidated pictures, as the case may be.
  34.     
  35.     Good stuff to look for:
  36.     
  37.         • Example of custom PicComment usage with unique
  38.           identifiers.
  39.           {-> CustomPicProc, CompositePictures <-}
  40.     
  41.         • Example of a custom QuickDraw bottleneck procedure
  42.           which works in both GrafPorts and CGrafPorts.
  43.           {-> DisassemblePictures <-}
  44.  
  45.         • Example of finding the deepest device and placing
  46.           a window on it.
  47.           {-> ShowThePicts <-}
  48.  
  49.  
  50.     This sample is a rewrite of the 'DTS Groupies' sample.
  51.  
  52. ik 3/14/97